package charatr03.example.example;
class Student7{
    private String name;
    private int age;
    public Student7(){}
    public Student7(String n ){
        name= n;
    }
    public Student7(String n ,int a){
        name= n;
        age=a;
    }
    public void read(){
        System.out.println("我是："+name+"，年龄："+age);
    }
}
public class Example07 {
    public static void main(String[] args) {
        Student7 stu  =new Student7("张三");
        Student7 stu1  =new Student7("张三",18);//实例化对象
        stu.read();
        stu1.read();
    }
}
